(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

div2(S(S(x))) → +(S(0), div2(x))
div2(S(0)) → 0
div2(0) → 0

The (relative) TRS S consists of the following rules:

+(x, S(0)) → S(x)
+(S(0), y) → S(y)

Rewrite Strategy: INNERMOST

(1) RelTrsToTrsProof (UPPER BOUND(ID) transformation)

transformed relative TRS to TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

div2(S(S(x))) → +(S(0), div2(x))
div2(S(0)) → 0
div2(0) → 0
+(x, S(0)) → S(x)
+(S(0), y) → S(y)

Rewrite Strategy: INNERMOST

(3) CpxTrsMatchBoundsTAProof (EQUIVALENT transformation)

A linear upper bound on the runtime complexity of the TRS R could be shown with a Match-Bound[TAB_LEFTLINEAR,TAB_NONLEFTLINEAR] (for contructor-based start-terms) of 2.

The compatible tree automaton used to show the Match-Boundedness (for constructor-based start-terms) is represented by:
final states : [1, 2]
transitions:
S0(0) → 0
00() → 0
div20(0) → 1
+0(0, 0) → 2
01() → 4
S1(4) → 3
div21(0) → 5
+1(3, 5) → 1
01() → 1
S1(0) → 2
+1(3, 5) → 5
01() → 5
S2(5) → 1
S2(5) → 5
S2(3) → 1
S2(3) → 5

(4) BOUNDS(1, n^1)

(5) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

div2(S(S(z0))) → +(S(0), div2(z0))
div2(S(0)) → 0
div2(0) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

DIV2(S(S(z0))) → c(+'(S(0), div2(z0)), DIV2(z0))
DIV2(S(0)) → c1
DIV2(0) → c2
+'(z0, S(0)) → c3
+'(S(0), z0) → c4
S tuples:

DIV2(S(S(z0))) → c(+'(S(0), div2(z0)), DIV2(z0))
DIV2(S(0)) → c1
DIV2(0) → c2
+'(z0, S(0)) → c3
+'(S(0), z0) → c4
K tuples:none
Defined Rule Symbols:

div2, +

Defined Pair Symbols:

DIV2, +'

Compound Symbols:

c, c1, c2, c3, c4

(7) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 4 trailing nodes:

+'(z0, S(0)) → c3
DIV2(S(0)) → c1
+'(S(0), z0) → c4
DIV2(0) → c2

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

div2(S(S(z0))) → +(S(0), div2(z0))
div2(S(0)) → 0
div2(0) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

DIV2(S(S(z0))) → c(+'(S(0), div2(z0)), DIV2(z0))
S tuples:

DIV2(S(S(z0))) → c(+'(S(0), div2(z0)), DIV2(z0))
K tuples:none
Defined Rule Symbols:

div2, +

Defined Pair Symbols:

DIV2

Compound Symbols:

c

(9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

div2(S(S(z0))) → +(S(0), div2(z0))
div2(S(0)) → 0
div2(0) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
S tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
K tuples:none
Defined Rule Symbols:

div2, +

Defined Pair Symbols:

DIV2

Compound Symbols:

c

(11) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

div2(S(S(z0))) → +(S(0), div2(z0))
div2(S(0)) → 0
div2(0) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
S tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

DIV2

Compound Symbols:

c

(13) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

DIV2(S(S(z0))) → c(DIV2(z0))
We considered the (Usable) Rules:none
And the Tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(DIV2(x1)) = [2]x1   
POL(S(x1)) = [1] + x1   
POL(c(x1)) = x1   

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
S tuples:none
K tuples:

DIV2(S(S(z0))) → c(DIV2(z0))
Defined Rule Symbols:none

Defined Pair Symbols:

DIV2

Compound Symbols:

c

(15) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(16) BOUNDS(1, 1)